//Benix Base functions

var thread_list = new Array();
var threadID_list = new Array();
var currentNewThread = 0;
var schedule_tick = 1000;

function scheduler( )
{
    setTimeout(scheduler,schedule_tick);
};

function start(args,argsv)
{
    scheduler();
    uiInit(0,0,960,960);
    animationInit();
    
    runUser(args,argsv);
};

function runUser(args,argsv)
{
    if(loadLock == 0)
    {
        main(args,argsv);
    }
    else
    {
        setTimeout(runUser(args,argsv),1000);
    }
};

function exit_thread(return_value)
{

};

function kill_thread(thread_id)
{
    clearInterval(thread_id);
};

function kill_team(team_id)
{

};

function on_exit_thread( callback, data)
{

};

function find_thread(name)
{

};

function get_team_info(team, info)
{

};

function get_next_team_info(cookie,info)
{

};

function spawn_thread(thread_func,name,priority,data)
{
    thread_list[currentNewThread] = name;
    threadID_list[currentNewThread] = setInterval(thread_func,priority);
    
    return threadID_list[currentNewThread];
};

function suspspend_thread(thread_id)
{

};

function wait_for_thread(thread_id, exit_value)
{

};